<template>
	<view class="normal-login-container">
		<div class="mox">
			<div @click="funs()" style="background: #ffffff;border-radius: 12px;padding: 15px 15px 0 15px;width: 50%;margin-right: 15px;">
				<div style="font-size: 18px;color: #3f9e6f;font-weight: 550;margin-bottom: 15px;">我的活动</div>
				<div style="font-size: 30px;color: #3f9e6f;font-weight: 550;margin-bottom: 15px;text-align: right;">{{ count }}</div>
			</div>
			<div style="background: #ffffff;border-radius: 12px;padding: 15px 15px 0 15px;width: 50%;" @click="fun()">
				<div style="font-size: 18px;color: #3f9e6f;font-weight: 550;margin-bottom: 15px;">发布活动</div>
				<div style="font-size: 18px;color: #a9a9a9;font-weight: 550;text-align: right;">去发布</div>
			</div>
		</div>
	</view>
</template>

<script>
	import {
		user_getUserCreateActivityInfo
	} from '@/api/system/user.js'
	export default {
		data() {
			return {
				count:''
			}
		},
		created() {
			this.user_getUserCreateActivityInfo()
		},
		methods: {
			async user_getUserCreateActivityInfo(){
				const data = await user_getUserCreateActivityInfo();
				if(data.code==200){
				   this.count = data.content.count;
				}
			},
			fun(){
				uni.navigateTo({
					url:'/pages/release'
				})
			},
			funs(){
				uni.navigateTo({
					url:'/pages/myactivity'
				})
			}
		}
	}
</script>
<style lang="less" scoped>
	.normal-login-container {
		background-color: #f4f4f4; /* 添加页面背景色 */
		min-height: 100vh; /* 确保背景色覆盖整个页面 */
		padding-top: 20px;
	}

	.mox {
		width: 93%;
		margin-left: 12px;
		display: flex;
		justify-content: space-between;
	}
</style>